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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gtk4-layer-shell.h>
#include <stdio.h>
#include <gdk/gdk.h>
#include <float.h>
#include <math.h>
#include <graphene-gobject.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_TYPE_CONTROL_CENTER (sway_notification_center_control_center_get_type ())
#define SWAY_NOTIFICATION_CENTER_CONTROL_CENTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_TYPE_CONTROL_CENTER, SwayNotificationCenterControlCenter))
#define SWAY_NOTIFICATION_CENTER_CONTROL_CENTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_TYPE_CONTROL_CENTER, SwayNotificationCenterControlCenterClass))
#define SWAY_NOTIFICATION_CENTER_IS_CONTROL_CENTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_TYPE_CONTROL_CENTER))
#define SWAY_NOTIFICATION_CENTER_IS_CONTROL_CENTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_TYPE_CONTROL_CENTER))
#define SWAY_NOTIFICATION_CENTER_CONTROL_CENTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_TYPE_CONTROL_CENTER, SwayNotificationCenterControlCenterClass))

typedef struct _SwayNotificationCenterControlCenter SwayNotificationCenterControlCenter;
typedef struct _SwayNotificationCenterControlCenterClass SwayNotificationCenterControlCenterClass;
typedef struct _SwayNotificationCenterControlCenterPrivate SwayNotificationCenterControlCenterPrivate;

#define TYPE_ITER_BOX (iter_box_get_type ())
#define ITER_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ITER_BOX, IterBox))
#define ITER_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ITER_BOX, IterBoxClass))
#define IS_ITER_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ITER_BOX))
#define IS_ITER_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ITER_BOX))
#define ITER_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ITER_BOX, IterBoxClass))

typedef struct _IterBox IterBox;
typedef struct _IterBoxClass IterBoxClass;

#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;
enum  {
	SWAY_NOTIFICATION_CENTER_CONTROL_CENTER_0_PROPERTY,
	SWAY_NOTIFICATION_CENTER_CONTROL_CENTER_NUM_PROPERTIES
};
static GParamSpec* sway_notification_center_control_center_properties[SWAY_NOTIFICATION_CENTER_CONTROL_CENTER_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_WIDGETS_TYPE_NOTIFICATIONS (sway_notification_center_widgets_notifications_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_NOTIFICATIONS, SwayNotificationCenterWidgetsNotifications))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_NOTIFICATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_NOTIFICATIONS, SwayNotificationCenterWidgetsNotificationsClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_NOTIFICATIONS))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_NOTIFICATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_NOTIFICATIONS))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_NOTIFICATIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_NOTIFICATIONS, SwayNotificationCenterWidgetsNotificationsClass))

typedef struct _SwayNotificationCenterWidgetsNotifications SwayNotificationCenterWidgetsNotifications;
typedef struct _SwayNotificationCenterWidgetsNotificationsClass SwayNotificationCenterWidgetsNotificationsClass;

#define SWAY_NOTIFICATION_CENTER_TYPE_SWAYNC (sway_notification_center_swaync_get_type ())
#define SWAY_NOTIFICATION_CENTER_SWAYNC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_TYPE_SWAYNC, SwayNotificationCenterSwaync))
#define SWAY_NOTIFICATION_CENTER_SWAYNC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_TYPE_SWAYNC, SwayNotificationCenterSwayncClass))
#define SWAY_NOTIFICATION_CENTER_IS_SWAYNC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_TYPE_SWAYNC))
#define SWAY_NOTIFICATION_CENTER_IS_SWAYNC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_TYPE_SWAYNC))
#define SWAY_NOTIFICATION_CENTER_SWAYNC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_TYPE_SWAYNC, SwayNotificationCenterSwayncClass))

typedef struct _SwayNotificationCenterSwaync SwayNotificationCenterSwaync;
typedef struct _SwayNotificationCenterSwayncClass SwayNotificationCenterSwayncClass;
typedef struct _SwayNotificationCenterSwayncPrivate SwayNotificationCenterSwayncPrivate;

#define TYPE_XDG_ACTIVATION_HELPER (xdg_activation_helper_get_type ())
#define XDG_ACTIVATION_HELPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_XDG_ACTIVATION_HELPER, XdgActivationHelper))
#define XDG_ACTIVATION_HELPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_XDG_ACTIVATION_HELPER, XdgActivationHelperClass))
#define IS_XDG_ACTIVATION_HELPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_XDG_ACTIVATION_HELPER))
#define IS_XDG_ACTIVATION_HELPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_XDG_ACTIVATION_HELPER))
#define XDG_ACTIVATION_HELPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_XDG_ACTIVATION_HELPER, XdgActivationHelperClass))

typedef struct _XdgActivationHelper XdgActivationHelper;
typedef struct _XdgActivationHelperClass XdgActivationHelperClass;
typedef struct _Block14Data Block14Data;
#define __vala_graphene_rect_t_free0(var) ((var == NULL) ? NULL : (var = (_vala_graphene_rect_t_free (var), NULL)))
#define __vala_GdkEventSequence_free0(var) ((var == NULL) ? NULL : (var = (_vala_GdkEventSequence_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;

#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)))
typedef enum  {
	SWAY_NOTIFICATION_CENTER_POSITION_X_RIGHT,
	SWAY_NOTIFICATION_CENTER_POSITION_X_LEFT,
	SWAY_NOTIFICATION_CENTER_POSITION_X_CENTER,
	SWAY_NOTIFICATION_CENTER_POSITION_X_NONE
} SwayNotificationCenterPositionX;

#define SWAY_NOTIFICATION_CENTER_TYPE_POSITION_X (sway_notification_center_position_x_get_type ())
typedef enum  {
	SWAY_NOTIFICATION_CENTER_POSITION_Y_TOP,
	SWAY_NOTIFICATION_CENTER_POSITION_Y_BOTTOM,
	SWAY_NOTIFICATION_CENTER_POSITION_Y_CENTER,
	SWAY_NOTIFICATION_CENTER_POSITION_Y_NONE
} SwayNotificationCenterPositionY;

#define SWAY_NOTIFICATION_CENTER_TYPE_POSITION_Y (sway_notification_center_position_y_get_type ())
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 _SwayNotificationCenterControlCenter {
	GtkApplicationWindow parent_instance;
	SwayNotificationCenterControlCenterPrivate * priv;
};

struct _SwayNotificationCenterControlCenterClass {
	GtkApplicationWindowClass parent_class;
};

struct _SwayNotificationCenterControlCenterPrivate {
	GtkScrolledWindow* window;
	IterBox* box;
	GtkGestureClick* blank_window_gesture;
	gboolean blank_window_down;
	gboolean blank_window_in;
	GtkEventControllerKey* key_controller;
	GList* widgets;
	gchar* monitor_name;
};

struct _SwayNotificationCenterSwaync {
	GtkApplication parent_instance;
	SwayNotificationCenterSwayncPrivate * priv;
	gboolean use_layer_shell;
	gboolean has_layer_on_demand;
	XdgActivationHelper* xdg_activation;
};

struct _SwayNotificationCenterSwayncClass {
	GtkApplicationClass parent_class;
};

struct _Block14Data {
	int _ref_count_;
	SwayNotificationCenterControlCenter* self;
	GdkSurface* surface;
	gulong id;
};

static gint SwayNotificationCenterControlCenter_private_offset;
static gpointer sway_notification_center_control_center_parent_class = NULL;
VALA_EXTERN SwayNotificationCenterWidgetsNotifications* sway_notification_center_notifications_widget;
VALA_EXTERN SwayNotificationCenterSwaync* sway_notification_center_app;
VALA_EXTERN SwayNotificationCenterSwayncDaemon* sway_notification_center_swaync_daemon;

VALA_EXTERN GType sway_notification_center_control_center_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterControlCenter, g_object_unref)
VALA_EXTERN GType iter_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (IterBox, g_object_unref)
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 SwayNotificationCenterControlCenter* sway_notification_center_control_center_new (void);
VALA_EXTERN SwayNotificationCenterControlCenter* sway_notification_center_control_center_construct (GType object_type);
VALA_EXTERN GType sway_notification_center_widgets_notifications_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsNotifications, g_object_unref)
VALA_EXTERN GType sway_notification_center_swaync_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterSwaync, g_object_unref)
VALA_EXTERN GType xdg_activation_helper_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (XdgActivationHelper, g_object_unref)
static void sway_notification_center_control_center_set_anchor (SwayNotificationCenterControlCenter* self);
static void __lambda38_ (SwayNotificationCenterControlCenter* self);
static Block14Data* block14_data_ref (Block14Data* _data14_);
static void block14_data_unref (void * _userdata_);
static void __lambda39_ (Block14Data* _data14_,
                  GdkMonitor* monitor);
VALA_EXTERN gchar* sway_notification_center_functions_monitor_to_string (GdkMonitor* monitor);
VALA_EXTERN void sway_notification_center_swaync_show_blank_windows (SwayNotificationCenterSwaync* self,
                                                         GdkMonitor* ref_monitor);
static void ___lambda39__gdk_surface_enter_monitor (GdkSurface* _sender,
                                             GdkMonitor* monitor,
                                             gpointer self);
static void ___lambda38__gtk_widget_map (GtkWidget* _sender,
                                  gpointer self);
static void __lambda40_ (SwayNotificationCenterControlCenter* self);
VALA_EXTERN void sway_notification_center_swaync_hide_blank_windows (SwayNotificationCenterSwaync* self);
static void ___lambda40__gtk_widget_unmap (GtkWidget* _sender,
                                    gpointer self);
static void __lambda41_ (SwayNotificationCenterControlCenter* self,
                  gint n_press,
                  gdouble x,
                  gdouble y);
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 ___lambda41__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                             gint n_press,
                                             gdouble x,
                                             gdouble y,
                                             gpointer self);
static void __lambda42_ (SwayNotificationCenterControlCenter* self,
                  gint n_press,
                  gdouble x,
                  gdouble y);
VALA_EXTERN void sway_notification_center_control_center_set_visibility (SwayNotificationCenterControlCenter* self,
                                                             gboolean visibility);
static void _vala_GdkEventSequence_free (GdkEventSequence* self);
static void ___lambda42__gtk_gesture_click_released (GtkGestureClick* _sender,
                                              gint n_press,
                                              gdouble x,
                                              gdouble y,
                                              gpointer self);
static void __lambda43_ (SwayNotificationCenterControlCenter* self,
                  GtkGesture* gesture,
                  GdkEventSequence* sequence);
static void ___lambda43__gtk_gesture_update (GtkGesture* _sender,
                                      GdkEventSequence* sequence,
                                      gpointer self);
static void __lambda44_ (SwayNotificationCenterControlCenter* self);
static void ___lambda44__gtk_gesture_cancel (GtkGesture* _sender,
                                      GdkEventSequence* sequence,
                                      gpointer self);
static void sway_notification_center_control_center_key_released_event_cb (SwayNotificationCenterControlCenter* self,
                                                                    guint keyval,
                                                                    guint keycode,
                                                                    GdkModifierType state);
static void _sway_notification_center_control_center_key_released_event_cb_gtk_event_controller_key_key_released (GtkEventControllerKey* _sender,
                                                                                                           guint keyval,
                                                                                                           guint keycode,
                                                                                                           GdkModifierType state,
                                                                                                           gpointer self);
static gboolean sway_notification_center_control_center_key_press_event_cb (SwayNotificationCenterControlCenter* self,
                                                                     guint keyval,
                                                                     guint keycode,
                                                                     GdkModifierType state);
static gboolean _sway_notification_center_control_center_key_press_event_cb_gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                                                           guint keyval,
                                                                                                           guint keycode,
                                                                                                           GdkModifierType state,
                                                                                                           gpointer self);
VALA_EXTERN void sway_notification_center_control_center_add_widgets (SwayNotificationCenterControlCenter* self);
VALA_EXTERN GType sway_notification_center_config_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterConfigModel, g_object_unref)
static void __lambda90_ (SwayNotificationCenterControlCenter* self,
                  SwayNotificationCenterConfigModel* old,
                  SwayNotificationCenterConfigModel* config);
VALA_EXTERN const gchar* sway_notification_center_config_model_get_control_center_preferred_output (SwayNotificationCenterConfigModel* self);
static void ___lambda90__sway_notification_center_swaync_config_reload (SwayNotificationCenterSwaync* _sender,
                                                                 SwayNotificationCenterConfigModel* old_config,
                                                                 SwayNotificationCenterConfigModel* new_config,
                                                                 gpointer self);
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 gboolean sway_notification_center_swaync_daemon_toggle_dnd (SwayNotificationCenterSwayncDaemon* self,
                                                            GError** error);
VALA_EXTERN gboolean sway_notification_center_widgets_notifications_key_press_event_cb (SwayNotificationCenterWidgetsNotifications* self,
                                                                            guint keyval,
                                                                            guint keycode,
                                                                            GdkModifierType state);
static void __lambda47_ (SwayNotificationCenterControlCenter* self,
                  SwayNotificationCenterWidgetsBaseWidget* widget);
VALA_EXTERN void iter_box_remove (IterBox* self,
                      GtkWidget* child);
static void ___lambda47__gfunc (gconstpointer data,
                         gpointer self);
VALA_EXTERN SwayNotificationCenterConfigModel* sway_notification_center_config_model_get_instance (void);
VALA_EXTERN GPtrArray* sway_notification_center_config_model_get_widgets (SwayNotificationCenterConfigModel* self);
static gchar** _vala_array_dup1 (gchar** self,
                          gssize length);
static gchar** _vala_array_dup2 (gchar** self,
                          gssize length);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      gssize stack_length,
                                      const gchar* needle);
static void _vala_array_add36 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
VALA_EXTERN SwayNotificationCenterWidgetsBaseWidget* sway_notification_center_widgets_get_widget_from_key (gchar* key,
                                                                                               gboolean* is_notifications);
VALA_EXTERN void sway_notification_center_widgets_notifications_reload_config (SwayNotificationCenterWidgetsNotifications* self);
VALA_EXTERN void iter_box_append (IterBox* self,
                      GtkWidget* child);
VALA_EXTERN GType sway_notification_center_position_x_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SwayNotificationCenterPositionX sway_notification_center_config_model_get_control_center_positionX (SwayNotificationCenterConfigModel* self);
VALA_EXTERN SwayNotificationCenterPositionX sway_notification_center_config_model_get_positionX (SwayNotificationCenterConfigModel* self);
VALA_EXTERN GType sway_notification_center_position_y_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SwayNotificationCenterPositionY sway_notification_center_config_model_get_control_center_positionY (SwayNotificationCenterConfigModel* self);
VALA_EXTERN SwayNotificationCenterPositionY sway_notification_center_config_model_get_positionY (SwayNotificationCenterConfigModel* self);
VALA_EXTERN gboolean sway_notification_center_config_model_get_control_center_exclusive_zone (SwayNotificationCenterConfigModel* self);
VALA_EXTERN gboolean sway_notification_center_config_model_get_keyboard_shortcuts (SwayNotificationCenterConfigModel* self);
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);
VALA_EXTERN gboolean sway_notification_center_config_model_get_layer_shell_cover_screen (SwayNotificationCenterConfigModel* self);
VALA_EXTERN gboolean sway_notification_center_config_model_get_fit_to_screen (SwayNotificationCenterConfigModel* self);
VALA_EXTERN void sway_notification_center_control_center_set_monitor (SwayNotificationCenterControlCenter* self,
                                                          GdkMonitor* monitor);
VALA_EXTERN GdkMonitor* sway_notification_center_functions_try_get_monitor (const gchar* name);
VALA_EXTERN gint sway_notification_center_config_model_get_control_center_margin_top (SwayNotificationCenterConfigModel* self);
VALA_EXTERN gint sway_notification_center_config_model_get_control_center_margin_left (SwayNotificationCenterConfigModel* self);
VALA_EXTERN gint sway_notification_center_config_model_get_control_center_margin_right (SwayNotificationCenterConfigModel* self);
VALA_EXTERN gint sway_notification_center_config_model_get_control_center_margin_bottom (SwayNotificationCenterConfigModel* self);
VALA_EXTERN void sway_notification_center_widgets_notifications_set_list_is_reversed (SwayNotificationCenterWidgetsNotifications* self,
                                                                          gboolean reversed);
VALA_EXTERN gint sway_notification_center_config_model_get_control_center_height (SwayNotificationCenterConfigModel* self);
VALA_EXTERN gint sway_notification_center_config_model_get_control_center_width (SwayNotificationCenterConfigModel* self);
VALA_EXTERN gboolean sway_notification_center_control_center_toggle_visibility (SwayNotificationCenterControlCenter* self);
VALA_EXTERN void sway_notification_center_widgets_base_widget_on_cc_visibility_change (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                           gboolean value);
VALA_EXTERN void sway_notification_center_swaync_daemon_emit_subscribe (SwayNotificationCenterSwayncDaemon* self);
VALA_EXTERN gboolean sway_notification_center_control_center_get_visibility (SwayNotificationCenterControlCenter* self);
static void sway_notification_center_control_center_finalize (GObject * obj);
static GType sway_notification_center_control_center_get_type_once (void);
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 const gchar* SWAY_NOTIFICATION_CENTER_CONTROL_CENTER_DEFAULT_WIDGETS[3] = {"title", "dnd", "notifications"};

static inline gpointer
sway_notification_center_control_center_get_instance_private (SwayNotificationCenterControlCenter* self)
{
	return G_STRUCT_MEMBER_P (self, SwayNotificationCenterControlCenter_private_offset);
}

static Block14Data*
block14_data_ref (Block14Data* _data14_)
{
	g_atomic_int_inc (&_data14_->_ref_count_);
	return _data14_;
}

static void
block14_data_unref (void * _userdata_)
{
	Block14Data* _data14_;
	_data14_ = (Block14Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data14_->_ref_count_)) {
		SwayNotificationCenterControlCenter* self;
		self = _data14_->self;
		_g_object_unref0 (self);
		g_slice_free (Block14Data, _data14_);
	}
}

static void
__lambda39_ (Block14Data* _data14_,
             GdkMonitor* monitor)
{
	SwayNotificationCenterControlCenter* self;
	GdkSurface* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	SwayNotificationCenterSwaync* _tmp3_;
	self = _data14_->self;
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (monitor, gdk_monitor_get_type ()));
	_tmp0_ = _data14_->surface;
	g_signal_handler_disconnect (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_OBJECT, GObject), _data14_->id);
	_tmp1_ = sway_notification_center_functions_monitor_to_string (monitor);
	_tmp2_ = _tmp1_;
	g_debug ("controlCenter.vala:52: ControlCenter mapped on monitor: %s", _tmp2_);
	_g_free0 (_tmp2_);
	_tmp3_ = sway_notification_center_app;
	sway_notification_center_swaync_show_blank_windows (_tmp3_, monitor);
}

static void
___lambda39__gdk_surface_enter_monitor (GdkSurface* _sender,
                                        GdkMonitor* monitor,
                                        gpointer self)
{
	__lambda39_ (self, monitor);
}

static void
__lambda38_ (SwayNotificationCenterControlCenter* self)
{
	Block14Data* _data14_;
	GdkSurface* _tmp0_;
	GdkSurface* _tmp1_;
	GdkSurface* _tmp2_;
	gulong _tmp3_;
	_data14_ = g_slice_new0 (Block14Data);
	_data14_->_ref_count_ = 1;
	_data14_->self = g_object_ref (self);
	sway_notification_center_control_center_set_anchor (self);
	_tmp0_ = gtk_native_get_surface (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_native_get_type (), GtkNative));
	_data14_->surface = _tmp0_;
	_tmp1_ = _data14_->surface;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, gdk_surface_get_type ())) {
		g_warn_if_reached ();
		block14_data_unref (_data14_);
		_data14_ = NULL;
		return;
	}
	_data14_->id = (gulong) 0;
	_tmp2_ = _data14_->surface;
	_tmp3_ = g_signal_connect_data (_tmp2_, "enter-monitor", (GCallback) ___lambda39__gdk_surface_enter_monitor, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	_data14_->id = _tmp3_;
	block14_data_unref (_data14_);
	_data14_ = NULL;
}

static void
___lambda38__gtk_widget_map (GtkWidget* _sender,
                             gpointer self)
{
	__lambda38_ ((SwayNotificationCenterControlCenter*) self);
}

static void
__lambda40_ (SwayNotificationCenterControlCenter* self)
{
	SwayNotificationCenterSwaync* _tmp0_;
	g_debug ("controlCenter.vala:58: ControlCenter un-mapped");
	_tmp0_ = sway_notification_center_app;
	sway_notification_center_swaync_hide_blank_windows (_tmp0_);
}

static void
___lambda40__gtk_widget_unmap (GtkWidget* _sender,
                               gpointer self)
{
	__lambda40_ ((SwayNotificationCenterControlCenter*) self);
}

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

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
__lambda41_ (SwayNotificationCenterControlCenter* self,
             gint n_press,
             gdouble x,
             gdouble y)
{
	graphene_point_t click_point = {0};
	graphene_point_t _tmp0_ = {0};
	graphene_rect_t* bounds = NULL;
	GtkScrolledWindow* _tmp1_;
	graphene_rect_t _tmp2_ = {0};
	graphene_rect_t _tmp3_;
	graphene_rect_t* _tmp4_;
	gboolean _tmp5_ = FALSE;
	graphene_rect_t* _tmp6_;
	memset (&_tmp0_, 0, sizeof (graphene_point_t));
	click_point = *graphene_point_init (&_tmp0_, (gfloat) x, (gfloat) y);
	bounds = NULL;
	_tmp1_ = self->priv->window;
	gtk_widget_compute_bounds (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), &_tmp2_);
	__vala_graphene_rect_t_free0 (bounds);
	_tmp3_ = _tmp2_;
	_tmp4_ = __vala_graphene_rect_t_copy0 (&_tmp3_);
	bounds = _tmp4_;
	_tmp6_ = bounds;
	if (_tmp6_ != NULL) {
		graphene_rect_t* _tmp7_;
		graphene_point_t _tmp8_;
		_tmp7_ = bounds;
		_tmp8_ = click_point;
		_tmp5_ = graphene_rect_contains_point (_tmp7_, &_tmp8_);
	} else {
		_tmp5_ = FALSE;
	}
	self->priv->blank_window_in = !_tmp5_;
	self->priv->blank_window_down = TRUE;
	__vala_graphene_rect_t_free0 (bounds);
}

static void
___lambda41__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                        gint n_press,
                                        gdouble x,
                                        gdouble y,
                                        gpointer self)
{
	__lambda41_ ((SwayNotificationCenterControlCenter*) self, n_press, x, y);
}

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

static void
__lambda42_ (SwayNotificationCenterControlCenter* self,
             gint n_press,
             gdouble x,
             gdouble y)
{
	GtkGestureClick* _tmp0_;
	GdkEventSequence* _tmp1_;
	GdkEventSequence* _tmp2_;
	gboolean _tmp3_;
	if (!self->priv->blank_window_down) {
		return;
	}
	self->priv->blank_window_down = FALSE;
	if (self->priv->blank_window_in) {
		sway_notification_center_control_center_set_visibility (self, FALSE);
	}
	_tmp0_ = self->priv->blank_window_gesture;
	_tmp1_ = gtk_gesture_single_get_current_sequence (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_gesture_single_get_type (), GtkGestureSingle));
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_ == NULL;
	__vala_GdkEventSequence_free0 (_tmp2_);
	if (_tmp3_) {
		self->priv->blank_window_in = FALSE;
	}
}

static void
___lambda42__gtk_gesture_click_released (GtkGestureClick* _sender,
                                         gint n_press,
                                         gdouble x,
                                         gdouble y,
                                         gpointer self)
{
	__lambda42_ ((SwayNotificationCenterControlCenter*) self, n_press, x, y);
}

static void
__lambda43_ (SwayNotificationCenterControlCenter* 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;
	GtkScrolledWindow* _tmp8_;
	graphene_rect_t _tmp9_ = {0};
	graphene_rect_t _tmp10_;
	graphene_rect_t* _tmp11_;
	gboolean _tmp12_ = FALSE;
	graphene_rect_t* _tmp13_;
	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;
	_tmp8_ = self->priv->window;
	gtk_widget_compute_bounds (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget), G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), &_tmp9_);
	__vala_graphene_rect_t_free0 (bounds);
	_tmp10_ = _tmp9_;
	_tmp11_ = __vala_graphene_rect_t_copy0 (&_tmp10_);
	bounds = _tmp11_;
	_tmp13_ = bounds;
	if (_tmp13_ != NULL) {
		graphene_rect_t* _tmp14_;
		graphene_point_t _tmp15_;
		_tmp14_ = bounds;
		_tmp15_ = click_point;
		_tmp12_ = graphene_rect_contains_point (_tmp14_, &_tmp15_);
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		self->priv->blank_window_in = FALSE;
	}
	__vala_graphene_rect_t_free0 (bounds);
	_g_object_unref0 (gesture_single);
}

static void
___lambda43__gtk_gesture_update (GtkGesture* _sender,
                                 GdkEventSequence* sequence,
                                 gpointer self)
{
	__lambda43_ ((SwayNotificationCenterControlCenter*) self, _sender, sequence);
}

static void
__lambda44_ (SwayNotificationCenterControlCenter* self)
{
	self->priv->blank_window_down = FALSE;
}

static void
___lambda44__gtk_gesture_cancel (GtkGesture* _sender,
                                 GdkEventSequence* sequence,
                                 gpointer self)
{
	__lambda44_ ((SwayNotificationCenterControlCenter*) self);
}

static void
_sway_notification_center_control_center_key_released_event_cb_gtk_event_controller_key_key_released (GtkEventControllerKey* _sender,
                                                                                                      guint keyval,
                                                                                                      guint keycode,
                                                                                                      GdkModifierType state,
                                                                                                      gpointer self)
{
	sway_notification_center_control_center_key_released_event_cb ((SwayNotificationCenterControlCenter*) self, keyval, keycode, state);
}

static gboolean
_sway_notification_center_control_center_key_press_event_cb_gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                                                  guint keyval,
                                                                                                  guint keycode,
                                                                                                  GdkModifierType state,
                                                                                                  gpointer self)
{
	gboolean result;
	result = sway_notification_center_control_center_key_press_event_cb ((SwayNotificationCenterControlCenter*) self, keyval, keycode, state);
	return result;
}

static void
__lambda90_ (SwayNotificationCenterControlCenter* self,
             SwayNotificationCenterConfigModel* old,
             SwayNotificationCenterConfigModel* config)
{
	gchar* monitor_name = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	g_return_if_fail ((old == NULL) || SWAY_NOTIFICATION_CENTER_IS_CONFIG_MODEL (old));
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_IS_CONFIG_MODEL (config));
	_tmp0_ = sway_notification_center_config_model_get_control_center_preferred_output (config);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	monitor_name = _tmp2_;
	if (old == NULL) {
		_tmp4_ = TRUE;
	} else {
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = sway_notification_center_config_model_get_control_center_preferred_output (old);
		_tmp6_ = _tmp5_;
		_tmp7_ = monitor_name;
		_tmp4_ = g_strcmp0 (_tmp6_, _tmp7_) != 0;
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp8_ = self->priv->monitor_name;
		_tmp9_ = monitor_name;
		_tmp3_ = g_strcmp0 (_tmp8_, _tmp9_) != 0;
	}
	if (_tmp3_) {
		_g_free0 (self->priv->monitor_name);
		self->priv->monitor_name = NULL;
		sway_notification_center_control_center_set_anchor (self);
	}
	_g_free0 (monitor_name);
}

static void
___lambda90__sway_notification_center_swaync_config_reload (SwayNotificationCenterSwaync* _sender,
                                                            SwayNotificationCenterConfigModel* old_config,
                                                            SwayNotificationCenterConfigModel* new_config,
                                                            gpointer self)
{
	__lambda90_ ((SwayNotificationCenterControlCenter*) self, old_config, new_config);
}

SwayNotificationCenterControlCenter*
sway_notification_center_control_center_construct (GType object_type)
{
	SwayNotificationCenterControlCenter * self = NULL;
	SwayNotificationCenterWidgetsNotifications* _tmp0_;
	SwayNotificationCenterSwaync* _tmp1_;
	GtkGestureClick* _tmp6_;
	GtkGestureClick* _tmp7_;
	GtkEventController* _tmp8_;
	GtkGestureClick* _tmp9_;
	GtkGestureClick* _tmp10_;
	GtkGestureClick* _tmp11_;
	GtkGestureClick* _tmp12_;
	GtkGestureClick* _tmp13_;
	GtkGestureClick* _tmp14_;
	GtkGestureClick* _tmp15_;
	GtkGestureClick* _tmp16_;
	GtkEventControllerKey* _tmp17_;
	GtkEventControllerKey* _tmp18_;
	GtkEventControllerKey* _tmp19_;
	GtkEventController* _tmp20_;
	GtkEventControllerKey* _tmp21_;
	GtkEventControllerKey* _tmp22_;
	SwayNotificationCenterSwaync* _tmp23_;
	self = (SwayNotificationCenterControlCenter*) g_object_new (object_type, "css-name", "blankwindow", NULL);
	(self->priv->widgets == NULL) ? NULL : (self->priv->widgets = (g_list_free (self->priv->widgets), NULL));
	self->priv->widgets = NULL;
	_tmp0_ = sway_notification_center_notifications_widget;
	self->priv->widgets = g_list_append (self->priv->widgets, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget));
	_tmp1_ = sway_notification_center_app;
	if (_tmp1_->use_layer_shell) {
		if (!gtk_layer_is_supported ()) {
			FILE* _tmp2_;
			FILE* _tmp3_;
			FILE* _tmp4_;
			FILE* _tmp5_;
			_tmp2_ = stderr;
			fprintf (_tmp2_, "GTKLAYERSHELL IS NOT SUPPORTED!\n");
			_tmp3_ = stderr;
			fprintf (_tmp3_, "Swaync only works on Wayland!\n");
			_tmp4_ = stderr;
			fprintf (_tmp4_, "If running wayland session, try running:\n");
			_tmp5_ = stderr;
			fprintf (_tmp5_, "\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");
		sway_notification_center_control_center_set_anchor (self);
	}
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "map", (GCallback) ___lambda38__gtk_widget_map, self, 0);
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "unmap", (GCallback) ___lambda40__gtk_widget_unmap, self, 0);
	_tmp6_ = (GtkGestureClick*) gtk_gesture_click_new ();
	if (_tmp6_) {
		g_object_set_data ((GObject *) _tmp6_, "vala-creation-function", "SwayNotificationCenter.ControlCenter.new");
	}
	_g_object_unref0 (self->priv->blank_window_gesture);
	self->priv->blank_window_gesture = _tmp6_;
	_tmp7_ = self->priv->blank_window_gesture;
	_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_event_controller_get_type (), GtkEventController));
	gtk_widget_add_controller (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), _tmp8_);
	_tmp9_ = self->priv->blank_window_gesture;
	gtk_gesture_single_set_touch_only (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_gesture_single_get_type (), GtkGestureSingle), FALSE);
	_tmp10_ = self->priv->blank_window_gesture;
	gtk_gesture_single_set_exclusive (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_gesture_single_get_type (), GtkGestureSingle), TRUE);
	_tmp11_ = self->priv->blank_window_gesture;
	gtk_gesture_single_set_button (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_gesture_single_get_type (), GtkGestureSingle), (guint) GDK_BUTTON_PRIMARY);
	_tmp12_ = self->priv->blank_window_gesture;
	gtk_event_controller_set_propagation_phase (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_event_controller_get_type (), GtkEventController), GTK_PHASE_BUBBLE);
	_tmp13_ = self->priv->blank_window_gesture;
	g_signal_connect_object (_tmp13_, "pressed", (GCallback) ___lambda41__gtk_gesture_click_pressed, self, 0);
	_tmp14_ = self->priv->blank_window_gesture;
	g_signal_connect_object (_tmp14_, "released", (GCallback) ___lambda42__gtk_gesture_click_released, self, 0);
	_tmp15_ = self->priv->blank_window_gesture;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_gesture_get_type (), GtkGesture), "update", (GCallback) ___lambda43__gtk_gesture_update, self, 0);
	_tmp16_ = self->priv->blank_window_gesture;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_gesture_get_type (), GtkGesture), "cancel", (GCallback) ___lambda44__gtk_gesture_cancel, self, 0);
	_tmp17_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
	if (_tmp17_) {
		g_object_set_data ((GObject *) _tmp17_, "vala-creation-function", "SwayNotificationCenter.ControlCenter.new");
	}
	_g_object_unref0 (self->priv->key_controller);
	self->priv->key_controller = _tmp17_;
	_tmp18_ = self->priv->key_controller;
	gtk_event_controller_set_propagation_phase (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_event_controller_get_type (), GtkEventController), GTK_PHASE_CAPTURE);
	_tmp19_ = self->priv->key_controller;
	_tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_event_controller_get_type (), GtkEventController));
	gtk_widget_add_controller (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), _tmp20_);
	_tmp21_ = self->priv->key_controller;
	g_signal_connect_object (_tmp21_, "key-released", (GCallback) _sway_notification_center_control_center_key_released_event_cb_gtk_event_controller_key_key_released, self, 0);
	_tmp22_ = self->priv->key_controller;
	g_signal_connect_object (_tmp22_, "key-pressed", (GCallback) _sway_notification_center_control_center_key_press_event_cb_gtk_event_controller_key_key_pressed, self, 0);
	sway_notification_center_control_center_add_widgets (self);
	_tmp23_ = sway_notification_center_app;
	g_signal_connect_object (_tmp23_, "config-reload", (GCallback) ___lambda90__sway_notification_center_swaync_config_reload, self, 0);
	return self;
}

SwayNotificationCenterControlCenter*
sway_notification_center_control_center_new (void)
{
	return sway_notification_center_control_center_construct (SWAY_NOTIFICATION_CENTER_TYPE_CONTROL_CENTER);
}

static void
sway_notification_center_control_center_key_released_event_cb (SwayNotificationCenterControlCenter* self,
                                                               guint keyval,
                                                               guint keycode,
                                                               GdkModifierType state)
{
	GtkWidget* _tmp0_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	GQuark _tmp8_ = 0U;
	static GQuark _tmp7_label0 = 0;
	static GQuark _tmp7_label1 = 0;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_IS_CONTROL_CENTER (self));
	_tmp0_ = gtk_root_get_focus (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_root_get_type (), GtkRoot));
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_entry_get_type ())) {
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		GQuark _tmp4_ = 0U;
		static GQuark _tmp3_label0 = 0;
		_tmp1_ = gdk_keyval_name (keyval);
		_tmp2_ = _tmp1_;
		_tmp4_ = (NULL == _tmp2_) ? 0 : g_quark_from_string (_tmp2_);
		if (_tmp4_ == ((0 != _tmp3_label0) ? _tmp3_label0 : (_tmp3_label0 = g_quark_from_static_string ("Escape")))) {
			switch (0) {
				default:
				{
					gtk_root_set_focus (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_root_get_type (), GtkRoot), NULL);
					return;
				}
			}
		}
		return;
	}
	_tmp5_ = gdk_keyval_name (keyval);
	_tmp6_ = _tmp5_;
	_tmp8_ = (NULL == _tmp6_) ? 0 : g_quark_from_string (_tmp6_);
	if ((_tmp8_ == ((0 != _tmp7_label0) ? _tmp7_label0 : (_tmp7_label0 = g_quark_from_static_string ("Escape")))) || (_tmp8_ == ((0 != _tmp7_label1) ? _tmp7_label1 : (_tmp7_label1 = g_quark_from_static_string ("Caps_Lock"))))) {
		switch (0) {
			default:
			{
				sway_notification_center_control_center_set_visibility (self, FALSE);
				return;
			}
		}
	}
}

static gboolean
sway_notification_center_control_center_key_press_event_cb (SwayNotificationCenterControlCenter* self,
                                                            guint keyval,
                                                            guint keycode,
                                                            GdkModifierType state)
{
	GtkWidget* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GQuark _tmp4_ = 0U;
	static GQuark _tmp3_label0 = 0;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_IS_CONTROL_CENTER (self), FALSE);
	_tmp0_ = gtk_root_get_focus (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_root_get_type (), GtkRoot));
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_editable_get_type ())) {
		result = FALSE;
		return result;
	}
	_tmp1_ = gdk_keyval_name (keyval);
	_tmp2_ = _tmp1_;
	_tmp4_ = (NULL == _tmp2_) ? 0 : g_quark_from_string (_tmp2_);
	if (_tmp4_ == ((0 != _tmp3_label0) ? _tmp3_label0 : (_tmp3_label0 = g_quark_from_static_string ("D")))) {
		switch (0) {
			default:
			{
				{
					SwayNotificationCenterSwayncDaemon* _tmp5_;
					_tmp5_ = sway_notification_center_swaync_daemon;
					sway_notification_center_swaync_daemon_toggle_dnd (_tmp5_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
				}
				goto __finally0;
				__catch0_g_error:
				{
					GError* e = NULL;
					GError* _tmp6_;
					const gchar* _tmp7_;
					e = _inner_error0_;
					_inner_error0_ = NULL;
					_tmp6_ = e;
					_tmp7_ = _tmp6_->message;
					g_critical ("controlCenter.vala:163: Error: %s\n", _tmp7_);
					_g_error_free0 (e);
				}
				__finally0:
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					gboolean _tmp8_ = FALSE;
					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 _tmp8_;
				}
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				SwayNotificationCenterWidgetsNotifications* _tmp9_;
				_tmp9_ = sway_notification_center_notifications_widget;
				result = sway_notification_center_widgets_notifications_key_press_event_cb (_tmp9_, keyval, keycode, state);
				return result;
			}
		}
	}
	result = TRUE;
	return result;
}

/** Adds all custom widgets. Removes previous widgets */
static void
__lambda47_ (SwayNotificationCenterControlCenter* self,
             SwayNotificationCenterWidgetsBaseWidget* widget)
{
	GtkWidget* _tmp0_;
	IterBox* _tmp1_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (widget));
	_tmp0_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (widget, gtk_widget_get_type (), GtkWidget));
	_tmp1_ = self->priv->box;
	if (_tmp0_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget)) {
		IterBox* _tmp2_;
		_tmp2_ = self->priv->box;
		iter_box_remove (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (widget, gtk_widget_get_type (), GtkWidget));
	}
	if (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_NOTIFICATIONS (widget)) {
		return;
	}
	self->priv->widgets = g_list_remove (self->priv->widgets, widget);
}

static void
___lambda47__gfunc (gconstpointer data,
                    gpointer self)
{
	__lambda47_ ((SwayNotificationCenterControlCenter*) self, (SwayNotificationCenterWidgetsBaseWidget*) data);
}

static gchar**
_vala_array_dup1 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static gchar**
_vala_array_dup2 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static gboolean
_vala_string_array_contains (gchar* * stack,
                             gssize stack_length,
                             const gchar* needle)
{
	gssize i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}

static void
_vala_array_add36 (gchar** * array,
                   gint* length,
                   gint* size,
                   gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

void
sway_notification_center_control_center_add_widgets (SwayNotificationCenterControlCenter* self)
{
	GList* _tmp0_;
	gchar** w = NULL;
	SwayNotificationCenterConfigModel* _tmp1_;
	SwayNotificationCenterConfigModel* _tmp2_;
	GPtrArray* _tmp3_;
	GPtrArray* _tmp4_;
	gpointer* _tmp5_;
	gint _tmp5__length1;
	gchar** _tmp6_;
	gint _tmp6__length1;
	gint w_length1;
	gint _w_size_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	gchar** _tmp9_;
	gint _tmp9__length1;
	gboolean has_notifications = FALSE;
	gchar** _tmp11_;
	gint _tmp11__length1;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_IS_CONTROL_CENTER (self));
	_tmp0_ = self->priv->widgets;
	g_list_foreach (_tmp0_, ___lambda47__gfunc, self);
	_tmp1_ = sway_notification_center_config_model_get_instance ();
	_tmp2_ = _tmp1_;
	_tmp3_ = sway_notification_center_config_model_get_widgets (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_->pdata;
	_tmp5__length1 = _tmp4_->len;
	_tmp6_ = (_tmp5_ != NULL) ? _vala_array_dup1 (_tmp5_, _tmp5__length1) : _tmp5_;
	_tmp6__length1 = _tmp5__length1;
	w = _tmp6_;
	w_length1 = _tmp6__length1;
	_w_size_ = w_length1;
	_tmp7_ = w;
	_tmp7__length1 = w_length1;
	if (_tmp7__length1 == 0) {
		gchar** _tmp8_;
		gint _tmp8__length1;
		_tmp8_ = _vala_array_dup2 (SWAY_NOTIFICATION_CENTER_CONTROL_CENTER_DEFAULT_WIDGETS, G_N_ELEMENTS (SWAY_NOTIFICATION_CENTER_CONTROL_CENTER_DEFAULT_WIDGETS));
		_tmp8__length1 = G_N_ELEMENTS (SWAY_NOTIFICATION_CENTER_CONTROL_CENTER_DEFAULT_WIDGETS);
		w = (_vala_array_free (w, w_length1, (GDestroyNotify) g_free), NULL);
		w = _tmp8_;
		w_length1 = _tmp8__length1;
		_w_size_ = w_length1;
	}
	_tmp9_ = w;
	_tmp9__length1 = w_length1;
	if (!_vala_string_array_contains (_tmp9_, _tmp9__length1, "notifications")) {
		gchar* _tmp10_;
		g_warning ("controlCenter.vala:194: %s", "Notification widget not included in \"widgets\" config. " "Using default bottom position");
		_tmp10_ = g_strdup ("notifications");
		_vala_array_add36 (&w, &w_length1, &_w_size_, _tmp10_);
	}
	has_notifications = FALSE;
	_tmp11_ = w;
	_tmp11__length1 = w_length1;
	{
		gchar** key_collection = NULL;
		gint key_collection_length1 = 0;
		gint _key_collection_size_ = 0;
		gint key_it = 0;
		key_collection = _tmp11_;
		key_collection_length1 = _tmp11__length1;
		for (key_it = 0; key_it < key_collection_length1; key_it = key_it + 1) {
			gchar* _tmp12_;
			gchar* key = NULL;
			_tmp12_ = g_strdup (key_collection[key_it]);
			key = _tmp12_;
			{
				gboolean is_notifications = FALSE;
				SwayNotificationCenterWidgetsBaseWidget* widget = NULL;
				const gchar* _tmp13_;
				gchar* _tmp14_;
				gboolean _tmp15_ = FALSE;
				SwayNotificationCenterWidgetsBaseWidget* _tmp16_;
				SwayNotificationCenterWidgetsBaseWidget* _tmp21_;
				SwayNotificationCenterWidgetsBaseWidget* _tmp22_;
				SwayNotificationCenterWidgetsBaseWidget* cloned_widget = NULL;
				GList* _tmp23_;
				GList* _tmp24_;
				gconstpointer _tmp25_;
				IterBox* _tmp26_;
				SwayNotificationCenterWidgetsBaseWidget* _tmp27_;
				_tmp13_ = key;
				_tmp14_ = g_strdup (_tmp13_);
				_tmp16_ = sway_notification_center_widgets_get_widget_from_key (_tmp14_, &_tmp15_);
				is_notifications = _tmp15_;
				widget = _tmp16_;
				if (is_notifications) {
					SwayNotificationCenterWidgetsNotifications* _tmp18_;
					IterBox* _tmp19_;
					SwayNotificationCenterWidgetsNotifications* _tmp20_;
					if (has_notifications) {
						const gchar* _tmp17_;
						_tmp17_ = key;
						g_warning ("controlCenter.vala:207: Cannot have multiple \"notifications\" widgets" \
"! Skipping\"%s\"", _tmp17_);
						_g_object_unref0 (widget);
						_g_free0 (key);
						continue;
					}
					has_notifications = TRUE;
					_tmp18_ = sway_notification_center_notifications_widget;
					sway_notification_center_widgets_notifications_reload_config (_tmp18_);
					_tmp19_ = self->priv->box;
					_tmp20_ = sway_notification_center_notifications_widget;
					iter_box_append (_tmp19_, G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_widget_get_type (), GtkWidget));
					_g_object_unref0 (widget);
					_g_free0 (key);
					continue;
				}
				_tmp21_ = widget;
				if (_tmp21_ == NULL) {
					_g_object_unref0 (widget);
					_g_free0 (key);
					continue;
				}
				_tmp22_ = widget;
				self->priv->widgets = g_list_append (self->priv->widgets, _tmp22_);
				_tmp23_ = self->priv->widgets;
				_tmp24_ = g_list_last (_tmp23_);
				_tmp25_ = _tmp24_->data;
				cloned_widget = (SwayNotificationCenterWidgetsBaseWidget*) _tmp25_;
				_tmp26_ = self->priv->box;
				_tmp27_ = cloned_widget;
				iter_box_append (_tmp26_, G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_widget_get_type (), GtkWidget));
				_g_object_unref0 (widget);
				_g_free0 (key);
			}
		}
	}
	w = (_vala_array_free (w, w_length1, (GDestroyNotify) g_free), NULL);
}

/** Resets the UI positions */
static void
sway_notification_center_control_center_set_anchor (SwayNotificationCenterControlCenter* self)
{
	SwayNotificationCenterPositionX pos_x = 0;
	SwayNotificationCenterConfigModel* _tmp0_;
	SwayNotificationCenterConfigModel* _tmp1_;
	SwayNotificationCenterPositionX _tmp2_;
	SwayNotificationCenterPositionX _tmp3_;
	SwayNotificationCenterPositionY pos_y = 0;
	SwayNotificationCenterConfigModel* _tmp8_;
	SwayNotificationCenterConfigModel* _tmp9_;
	SwayNotificationCenterPositionY _tmp10_;
	SwayNotificationCenterPositionY _tmp11_;
	SwayNotificationCenterSwaync* _tmp16_;
	GtkScrolledWindow* _tmp49_;
	SwayNotificationCenterConfigModel* _tmp50_;
	SwayNotificationCenterConfigModel* _tmp51_;
	gint _tmp52_;
	gint _tmp53_;
	GtkScrolledWindow* _tmp54_;
	SwayNotificationCenterConfigModel* _tmp55_;
	SwayNotificationCenterConfigModel* _tmp56_;
	gint _tmp57_;
	gint _tmp58_;
	GtkScrolledWindow* _tmp59_;
	SwayNotificationCenterConfigModel* _tmp60_;
	SwayNotificationCenterConfigModel* _tmp61_;
	gint _tmp62_;
	gint _tmp63_;
	GtkScrolledWindow* _tmp64_;
	SwayNotificationCenterConfigModel* _tmp65_;
	SwayNotificationCenterConfigModel* _tmp66_;
	gint _tmp67_;
	gint _tmp68_;
	GtkAlign align_x = 0;
	GtkAlign align_y = 0;
	SwayNotificationCenterConfigModel* _tmp72_;
	SwayNotificationCenterConfigModel* _tmp73_;
	gboolean _tmp74_;
	gboolean _tmp75_;
	GtkScrolledWindow* _tmp76_;
	GtkScrolledWindow* _tmp77_;
	gboolean _tmp78_ = FALSE;
	SwayNotificationCenterConfigModel* _tmp79_;
	SwayNotificationCenterConfigModel* _tmp80_;
	gint _tmp81_;
	gint _tmp82_;
	GtkScrolledWindow* _tmp87_;
	GtkScrolledWindow* _tmp88_;
	SwayNotificationCenterConfigModel* _tmp89_;
	SwayNotificationCenterConfigModel* _tmp90_;
	gint _tmp91_;
	gint _tmp92_;
	SwayNotificationCenterConfigModel* _tmp93_;
	SwayNotificationCenterConfigModel* _tmp94_;
	gint _tmp95_;
	gint _tmp96_;
	IterBox* _tmp97_;
	SwayNotificationCenterConfigModel* _tmp98_;
	SwayNotificationCenterConfigModel* _tmp99_;
	gint _tmp100_;
	gint _tmp101_;
	SwayNotificationCenterConfigModel* _tmp102_;
	SwayNotificationCenterConfigModel* _tmp103_;
	gint _tmp104_;
	gint _tmp105_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_IS_CONTROL_CENTER (self));
	g_debug ("controlCenter.vala:233: ControlCenter set_anchor");
	_tmp0_ = sway_notification_center_config_model_get_instance ();
	_tmp1_ = _tmp0_;
	_tmp2_ = sway_notification_center_config_model_get_control_center_positionX (_tmp1_);
	_tmp3_ = _tmp2_;
	pos_x = _tmp3_;
	if (pos_x == SWAY_NOTIFICATION_CENTER_POSITION_X_NONE) {
		SwayNotificationCenterConfigModel* _tmp4_;
		SwayNotificationCenterConfigModel* _tmp5_;
		SwayNotificationCenterPositionX _tmp6_;
		SwayNotificationCenterPositionX _tmp7_;
		_tmp4_ = sway_notification_center_config_model_get_instance ();
		_tmp5_ = _tmp4_;
		_tmp6_ = sway_notification_center_config_model_get_positionX (_tmp5_);
		_tmp7_ = _tmp6_;
		pos_x = _tmp7_;
	}
	_tmp8_ = sway_notification_center_config_model_get_instance ();
	_tmp9_ = _tmp8_;
	_tmp10_ = sway_notification_center_config_model_get_control_center_positionY (_tmp9_);
	_tmp11_ = _tmp10_;
	pos_y = _tmp11_;
	if (pos_y == SWAY_NOTIFICATION_CENTER_POSITION_Y_NONE) {
		SwayNotificationCenterConfigModel* _tmp12_;
		SwayNotificationCenterConfigModel* _tmp13_;
		SwayNotificationCenterPositionY _tmp14_;
		SwayNotificationCenterPositionY _tmp15_;
		_tmp12_ = sway_notification_center_config_model_get_instance ();
		_tmp13_ = _tmp12_;
		_tmp14_ = sway_notification_center_config_model_get_positionY (_tmp13_);
		_tmp15_ = _tmp14_;
		pos_y = _tmp15_;
	}
	_tmp16_ = sway_notification_center_app;
	if (_tmp16_->use_layer_shell) {
		gint _tmp17_ = 0;
		SwayNotificationCenterConfigModel* _tmp18_;
		SwayNotificationCenterConfigModel* _tmp19_;
		gboolean _tmp20_;
		gboolean _tmp21_;
		gint exclusive_zone = 0;
		gboolean keyboard_shortcuts = FALSE;
		SwayNotificationCenterConfigModel* _tmp22_;
		SwayNotificationCenterConfigModel* _tmp23_;
		gboolean _tmp24_;
		gboolean _tmp25_;
		GtkLayerShellKeyboardMode _tmp26_ = 0;
		GtkLayerShellKeyboardMode mode = 0;
		SwayNotificationCenterConfigModel* _tmp27_;
		SwayNotificationCenterConfigModel* _tmp28_;
		SwayNotificationCenterLayer _tmp29_;
		SwayNotificationCenterLayer _tmp30_;
		gboolean cover_screen = FALSE;
		SwayNotificationCenterConfigModel* _tmp31_;
		SwayNotificationCenterConfigModel* _tmp32_;
		gboolean _tmp33_;
		gboolean _tmp34_;
		gchar* monitor_name = NULL;
		SwayNotificationCenterConfigModel* _tmp39_;
		SwayNotificationCenterConfigModel* _tmp40_;
		const gchar* _tmp41_;
		const gchar* _tmp42_;
		gchar* _tmp43_;
		const gchar* _tmp44_;
		const gchar* _tmp47_;
		GdkMonitor* _tmp48_;
		_tmp18_ = sway_notification_center_config_model_get_instance ();
		_tmp19_ = _tmp18_;
		_tmp20_ = sway_notification_center_config_model_get_control_center_exclusive_zone (_tmp19_);
		_tmp21_ = _tmp20_;
		if (_tmp21_) {
			_tmp17_ = 0;
		} else {
			_tmp17_ = 100;
		}
		exclusive_zone = _tmp17_;
		gtk_layer_set_exclusive_zone (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), exclusive_zone);
		_tmp22_ = sway_notification_center_config_model_get_instance ();
		_tmp23_ = _tmp22_;
		_tmp24_ = sway_notification_center_config_model_get_keyboard_shortcuts (_tmp23_);
		_tmp25_ = _tmp24_;
		keyboard_shortcuts = _tmp25_;
		if (keyboard_shortcuts) {
			_tmp26_ = GTK_LAYER_SHELL_KEYBOARD_MODE_EXCLUSIVE;
		} else {
			_tmp26_ = GTK_LAYER_SHELL_KEYBOARD_MODE_NONE;
		}
		mode = _tmp26_;
		gtk_layer_set_keyboard_mode (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), mode);
		_tmp27_ = sway_notification_center_config_model_get_instance ();
		_tmp28_ = _tmp27_;
		_tmp29_ = sway_notification_center_config_model_get_control_center_layer (_tmp28_);
		_tmp30_ = _tmp29_;
		gtk_layer_set_layer (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), sway_notification_center_layer_to_layer (_tmp30_));
		_tmp31_ = sway_notification_center_config_model_get_instance ();
		_tmp32_ = _tmp31_;
		_tmp33_ = sway_notification_center_config_model_get_layer_shell_cover_screen (_tmp32_);
		_tmp34_ = _tmp33_;
		cover_screen = _tmp34_;
		if (cover_screen) {
			gtk_layer_set_anchor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GTK_LAYER_SHELL_EDGE_TOP, cover_screen);
			gtk_layer_set_anchor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GTK_LAYER_SHELL_EDGE_LEFT, cover_screen);
			gtk_layer_set_anchor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GTK_LAYER_SHELL_EDGE_RIGHT, cover_screen);
			gtk_layer_set_anchor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GTK_LAYER_SHELL_EDGE_BOTTOM, cover_screen);
		} else {
			SwayNotificationCenterConfigModel* _tmp35_;
			SwayNotificationCenterConfigModel* _tmp36_;
			gboolean _tmp37_;
			gboolean _tmp38_;
			switch (pos_x) {
				case SWAY_NOTIFICATION_CENTER_POSITION_X_LEFT:
				{
					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, FALSE);
					break;
				}
				case SWAY_NOTIFICATION_CENTER_POSITION_X_CENTER:
				{
					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);
					break;
				}
				default:
				case SWAY_NOTIFICATION_CENTER_POSITION_X_RIGHT:
				{
					gtk_layer_set_anchor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GTK_LAYER_SHELL_EDGE_LEFT, FALSE);
					gtk_layer_set_anchor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GTK_LAYER_SHELL_EDGE_RIGHT, TRUE);
					break;
				}
			}
			_tmp35_ = sway_notification_center_config_model_get_instance ();
			_tmp36_ = _tmp35_;
			_tmp37_ = sway_notification_center_config_model_get_fit_to_screen (_tmp36_);
			_tmp38_ = _tmp37_;
			if (_tmp38_) {
				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);
			} else {
				switch (pos_y) {
					default:
					case SWAY_NOTIFICATION_CENTER_POSITION_Y_TOP:
					{
						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, FALSE);
						break;
					}
					case SWAY_NOTIFICATION_CENTER_POSITION_Y_CENTER:
					{
						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);
						break;
					}
					case SWAY_NOTIFICATION_CENTER_POSITION_Y_BOTTOM:
					{
						gtk_layer_set_anchor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GTK_LAYER_SHELL_EDGE_TOP, FALSE);
						gtk_layer_set_anchor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GTK_LAYER_SHELL_EDGE_BOTTOM, TRUE);
						break;
					}
				}
			}
		}
		_tmp39_ = sway_notification_center_config_model_get_instance ();
		_tmp40_ = _tmp39_;
		_tmp41_ = sway_notification_center_config_model_get_control_center_preferred_output (_tmp40_);
		_tmp42_ = _tmp41_;
		_tmp43_ = g_strdup (_tmp42_);
		monitor_name = _tmp43_;
		_tmp44_ = self->priv->monitor_name;
		if (_tmp44_ != NULL) {
			const gchar* _tmp45_;
			gchar* _tmp46_;
			_tmp45_ = self->priv->monitor_name;
			_tmp46_ = g_strdup (_tmp45_);
			_g_free0 (monitor_name);
			monitor_name = _tmp46_;
		}
		_tmp47_ = monitor_name;
		_tmp48_ = sway_notification_center_functions_try_get_monitor (_tmp47_);
		sway_notification_center_control_center_set_monitor (self, _tmp48_);
		_g_free0 (monitor_name);
	}
	_tmp49_ = self->priv->window;
	_tmp50_ = sway_notification_center_config_model_get_instance ();
	_tmp51_ = _tmp50_;
	_tmp52_ = sway_notification_center_config_model_get_control_center_margin_top (_tmp51_);
	_tmp53_ = _tmp52_;
	gtk_widget_set_margin_top (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, gtk_widget_get_type (), GtkWidget), _tmp53_);
	_tmp54_ = self->priv->window;
	_tmp55_ = sway_notification_center_config_model_get_instance ();
	_tmp56_ = _tmp55_;
	_tmp57_ = sway_notification_center_config_model_get_control_center_margin_left (_tmp56_);
	_tmp58_ = _tmp57_;
	gtk_widget_set_margin_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, gtk_widget_get_type (), GtkWidget), _tmp58_);
	_tmp59_ = self->priv->window;
	_tmp60_ = sway_notification_center_config_model_get_instance ();
	_tmp61_ = _tmp60_;
	_tmp62_ = sway_notification_center_config_model_get_control_center_margin_right (_tmp61_);
	_tmp63_ = _tmp62_;
	gtk_widget_set_margin_end (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, gtk_widget_get_type (), GtkWidget), _tmp63_);
	_tmp64_ = self->priv->window;
	_tmp65_ = sway_notification_center_config_model_get_instance ();
	_tmp66_ = _tmp65_;
	_tmp67_ = sway_notification_center_config_model_get_control_center_margin_bottom (_tmp66_);
	_tmp68_ = _tmp67_;
	gtk_widget_set_margin_bottom (G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, gtk_widget_get_type (), GtkWidget), _tmp68_);
	align_x = GTK_ALIGN_END;
	switch (pos_x) {
		case SWAY_NOTIFICATION_CENTER_POSITION_X_LEFT:
		{
			align_x = GTK_ALIGN_START;
			break;
		}
		case SWAY_NOTIFICATION_CENTER_POSITION_X_CENTER:
		{
			align_x = GTK_ALIGN_CENTER;
			break;
		}
		default:
		case SWAY_NOTIFICATION_CENTER_POSITION_X_RIGHT:
		{
			align_x = GTK_ALIGN_END;
			break;
		}
	}
	align_y = GTK_ALIGN_START;
	switch (pos_y) {
		default:
		case SWAY_NOTIFICATION_CENTER_POSITION_Y_TOP:
		{
			SwayNotificationCenterWidgetsNotifications* _tmp69_;
			align_y = GTK_ALIGN_START;
			_tmp69_ = sway_notification_center_notifications_widget;
			sway_notification_center_widgets_notifications_set_list_is_reversed (_tmp69_, FALSE);
			break;
		}
		case SWAY_NOTIFICATION_CENTER_POSITION_Y_CENTER:
		{
			SwayNotificationCenterWidgetsNotifications* _tmp70_;
			align_y = GTK_ALIGN_CENTER;
			_tmp70_ = sway_notification_center_notifications_widget;
			sway_notification_center_widgets_notifications_set_list_is_reversed (_tmp70_, FALSE);
			break;
		}
		case SWAY_NOTIFICATION_CENTER_POSITION_Y_BOTTOM:
		{
			SwayNotificationCenterWidgetsNotifications* _tmp71_;
			align_y = GTK_ALIGN_END;
			_tmp71_ = sway_notification_center_notifications_widget;
			sway_notification_center_widgets_notifications_set_list_is_reversed (_tmp71_, TRUE);
			break;
		}
	}
	_tmp72_ = sway_notification_center_config_model_get_instance ();
	_tmp73_ = _tmp72_;
	_tmp74_ = sway_notification_center_config_model_get_fit_to_screen (_tmp73_);
	_tmp75_ = _tmp74_;
	if (_tmp75_) {
		align_y = GTK_ALIGN_FILL;
	}
	_tmp76_ = self->priv->window;
	gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, gtk_widget_get_type (), GtkWidget), align_x);
	_tmp77_ = self->priv->window;
	gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp77_, gtk_widget_get_type (), GtkWidget), align_y);
	_tmp79_ = sway_notification_center_config_model_get_instance ();
	_tmp80_ = _tmp79_;
	_tmp81_ = sway_notification_center_config_model_get_control_center_height (_tmp80_);
	_tmp82_ = _tmp81_;
	if (_tmp82_ < 1) {
		_tmp78_ = TRUE;
	} else {
		SwayNotificationCenterConfigModel* _tmp83_;
		SwayNotificationCenterConfigModel* _tmp84_;
		gboolean _tmp85_;
		gboolean _tmp86_;
		_tmp83_ = sway_notification_center_config_model_get_instance ();
		_tmp84_ = _tmp83_;
		_tmp85_ = sway_notification_center_config_model_get_fit_to_screen (_tmp84_);
		_tmp86_ = _tmp85_;
		_tmp78_ = _tmp86_;
	}
	_tmp87_ = self->priv->window;
	gtk_scrolled_window_set_propagate_natural_height (_tmp87_, _tmp78_);
	_tmp88_ = self->priv->window;
	_tmp89_ = sway_notification_center_config_model_get_instance ();
	_tmp90_ = _tmp89_;
	_tmp91_ = sway_notification_center_config_model_get_control_center_width (_tmp90_);
	_tmp92_ = _tmp91_;
	_tmp93_ = sway_notification_center_config_model_get_instance ();
	_tmp94_ = _tmp93_;
	_tmp95_ = sway_notification_center_config_model_get_control_center_height (_tmp94_);
	_tmp96_ = _tmp95_;
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp88_, gtk_widget_get_type (), GtkWidget), _tmp92_, _tmp96_);
	_tmp97_ = self->priv->box;
	_tmp98_ = sway_notification_center_config_model_get_instance ();
	_tmp99_ = _tmp98_;
	_tmp100_ = sway_notification_center_config_model_get_control_center_width (_tmp99_);
	_tmp101_ = _tmp100_;
	_tmp102_ = sway_notification_center_config_model_get_instance ();
	_tmp103_ = _tmp102_;
	_tmp104_ = sway_notification_center_config_model_get_control_center_height (_tmp103_);
	_tmp105_ = _tmp104_;
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp97_, gtk_widget_get_type (), GtkWidget), _tmp101_, _tmp105_);
}

gboolean
sway_notification_center_control_center_toggle_visibility (SwayNotificationCenterControlCenter* self)
{
	gboolean cc_visibility = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_IS_CONTROL_CENTER (self), FALSE);
	_tmp0_ = gtk_widget_get_visible (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp1_ = _tmp0_;
	cc_visibility = !_tmp1_;
	sway_notification_center_control_center_set_visibility (self, cc_visibility);
	result = cc_visibility;
	return result;
}

void
sway_notification_center_control_center_set_visibility (SwayNotificationCenterControlCenter* self,
                                                        gboolean visibility)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	GList* _tmp2_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	SwayNotificationCenterSwayncDaemon* _tmp8_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_IS_CONTROL_CENTER (self));
	_tmp0_ = gtk_widget_get_visible (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp1_ = _tmp0_;
	if (_tmp1_ == visibility) {
		return;
	}
	gtk_widget_unrealize (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), visibility);
	_tmp2_ = self->priv->widgets;
	{
		GList* widget_collection = NULL;
		GList* widget_it = NULL;
		widget_collection = _tmp2_;
		for (widget_it = widget_collection; widget_it != NULL; widget_it = widget_it->next) {
			SwayNotificationCenterWidgetsBaseWidget* widget = NULL;
			widget = (SwayNotificationCenterWidgetsBaseWidget*) widget_it->data;
			{
				SwayNotificationCenterWidgetsBaseWidget* _tmp3_;
				gboolean _tmp4_;
				gboolean _tmp5_;
				_tmp3_ = widget;
				_tmp4_ = gtk_widget_get_visible (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
				_tmp5_ = _tmp4_;
				sway_notification_center_widgets_base_widget_on_cc_visibility_change (_tmp3_, _tmp5_);
			}
		}
	}
	_tmp6_ = gtk_widget_get_visible (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp7_ = _tmp6_;
	if (_tmp7_) {
		gtk_widget_add_css_class (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "open");
	} else {
		gtk_widget_remove_css_class (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "open");
	}
	_tmp8_ = sway_notification_center_swaync_daemon;
	sway_notification_center_swaync_daemon_emit_subscribe (_tmp8_);
}

inline gboolean
sway_notification_center_control_center_get_visibility (SwayNotificationCenterControlCenter* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_IS_CONTROL_CENTER (self), FALSE);
	_tmp0_ = gtk_widget_get_visible (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp1_ = _tmp0_;
	result = _tmp1_;
	return result;
}

void
sway_notification_center_control_center_set_monitor (SwayNotificationCenterControlCenter* self,
                                                     GdkMonitor* monitor)
{
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp6_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_IS_CONTROL_CENTER (self));
	g_return_if_fail ((monitor == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (monitor, gdk_monitor_get_type ()));
	_tmp1_ = sway_notification_center_functions_monitor_to_string (monitor);
	_tmp0_ = _tmp1_;
	if (_tmp0_ == NULL) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup ("Monitor Picked by Compositor");
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp2_;
	}
	g_debug ("controlCenter.vala:404: Setting monitor for ControlCenter: %s", _tmp0_);
	if (monitor == NULL) {
		_tmp3_ = NULL;
	} else {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp4_ = gdk_monitor_get_connector (monitor);
		_tmp5_ = _tmp4_;
		_tmp3_ = _tmp5_;
	}
	_tmp6_ = g_strdup (_tmp3_);
	_g_free0 (self->priv->monitor_name);
	self->priv->monitor_name = _tmp6_;
	gtk_layer_set_monitor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), monitor);
	_g_free0 (_tmp0_);
}

static void
sway_notification_center_control_center_class_init (SwayNotificationCenterControlCenterClass * klass,
                                                    gpointer klass_data)
{
	sway_notification_center_control_center_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SwayNotificationCenterControlCenter_private_offset);
	G_OBJECT_CLASS (klass)->finalize = sway_notification_center_control_center_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/erikreider/swaync/ui/control_center.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "window", FALSE, SwayNotificationCenterControlCenter_private_offset + G_STRUCT_OFFSET (SwayNotificationCenterControlCenterPrivate, window));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "box", FALSE, SwayNotificationCenterControlCenter_private_offset + G_STRUCT_OFFSET (SwayNotificationCenterControlCenterPrivate, box));
}

static void
sway_notification_center_control_center_instance_init (SwayNotificationCenterControlCenter * self,
                                                       gpointer klass)
{
	self->priv = sway_notification_center_control_center_get_instance_private (self);
	self->priv->blank_window_down = FALSE;
	self->priv->blank_window_in = FALSE;
	self->priv->monitor_name = NULL;
	g_type_ensure (TYPE_ITER_BOX);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
sway_notification_center_control_center_finalize (GObject * obj)
{
	SwayNotificationCenterControlCenter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SWAY_NOTIFICATION_CENTER_TYPE_CONTROL_CENTER, SwayNotificationCenterControlCenter);
	_g_object_unref0 (self->priv->blank_window_gesture);
	_g_object_unref0 (self->priv->key_controller);
	(self->priv->widgets == NULL) ? NULL : (self->priv->widgets = (g_list_free (self->priv->widgets), NULL));
	_g_free0 (self->priv->monitor_name);
	G_OBJECT_CLASS (sway_notification_center_control_center_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
sway_notification_center_control_center_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SwayNotificationCenterControlCenterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sway_notification_center_control_center_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SwayNotificationCenterControlCenter), 0, (GInstanceInitFunc) sway_notification_center_control_center_instance_init, NULL };
	GType sway_notification_center_control_center_type_id;
	sway_notification_center_control_center_type_id = g_type_register_static (gtk_application_window_get_type (), "SwayNotificationCenterControlCenter", &g_define_type_info, 0);
	SwayNotificationCenterControlCenter_private_offset = g_type_add_instance_private (sway_notification_center_control_center_type_id, sizeof (SwayNotificationCenterControlCenterPrivate));
	return sway_notification_center_control_center_type_id;
}

GType
sway_notification_center_control_center_get_type (void)
{
	static gsize sway_notification_center_control_center_type_id__once = 0;
	if (g_once_init_enter (&sway_notification_center_control_center_type_id__once)) {
		GType sway_notification_center_control_center_type_id;
		sway_notification_center_control_center_type_id = sway_notification_center_control_center_get_type_once ();
		g_once_init_leave (&sway_notification_center_control_center_type_id__once, sway_notification_center_control_center_type_id);
	}
	return sway_notification_center_control_center_type_id__once;
}

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

